Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from the deprecated Completions API to the Models API #654

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Jan 9, 2024

Description of the Change

We currently make a request to the Completions API when OpenAI settings are saved to verify the credentials are valid. This API is deprecated and was shut down January 4th. This PR switches from using that API to using the Models API for the same purpose.

How to test the Change

  1. With the current develop branch checked out, enter in valid credentials on the OpenAI ChatGPT settings page
  2. Save the page and notice a warning shows about a deprecated model
  3. Checkout this branch and save the settings again
  4. Notice a success message is shown

Changelog Entry

Changed - Switch from using the Completions API to the Models API to verify credentials.

Credits

Props @dkotter, @jeffpaul

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

…validate credentials, make a request to the models API
@dkotter dkotter added this to the 3.0.0 milestone Jan 9, 2024
@dkotter dkotter self-assigned this Jan 9, 2024
@dkotter dkotter requested review from jeffpaul and a team as code owners January 9, 2024 18:06
@dkotter dkotter modified the milestones: 3.0.0, 2.5.1 Jan 9, 2024
@dkotter dkotter requested review from a team and removed request for a team January 9, 2024 18:11
@dkotter dkotter mentioned this pull request Jan 9, 2024
16 tasks
@dkotter dkotter requested review from iamdharmesh and removed request for a team January 9, 2024 18:51
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @dkotter. LGTM.

@dkotter dkotter merged commit 94dc845 into develop Jan 10, 2024
13 checks passed
@dkotter dkotter deleted the fix/ada-model-deprecation branch January 10, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants